home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1997 October: Mac OS SDK / Dev.CD Oct 97 SDK1.toast / Development Kits (Disc 1) / Installer SDK Cornucopia 1.0.2 / Script Examples / InstaCompOneExample / myInstaCompOne.r < prev    next >
Encoding:
Text File  |  1996-09-30  |  6.3 KB  |  210 lines  |  [TEXT/MPS ]

  1. /*
  2. This script provides as example of using the InstaCompOne compression 
  3. and decompression tools to create a very simple script that installs 
  4. one SimpleText file (Example File) and a family of fonts (Helvetica).
  5.  
  6. The File Atom and Font Atom reference the ID of the 'inex' resource (ID 241) 
  7. that is included from the file "InstaCompOneAtomExt.rsrc".
  8.  
  9. */
  10.  
  11.  
  12. #include "InstallerTypes.r"
  13.  
  14. // Include the InstaCompOne atom extender stuff
  15. // making sure not to add their version resource
  16. // to our installer script. Also, since this include
  17. // is a resource include instead of a #include, it is
  18. // not actually a pre-processor thing, and won't be effected
  19. // by a -i option within the rez line in the makefile. 
  20. include ":::Tools:Released:InstaCompOne 1.1:InstaCompAtomExt.rsrc" NOT 'vers';
  21.  
  22. /************************** Package resources **********************************/
  23. resource 'inpk' (20037) {
  24.     format0 {
  25.         showsOnCustom,
  26.         notRemovable,
  27.         dontForceRestart,
  28.         0,
  29.         0,
  30.         "Example File Decompression",
  31.         {
  32.             'infa', 1001
  33.         }
  34.     }
  35. };
  36.  
  37. resource 'inpk' (20038) {
  38.     format0 {
  39.         showsOnCustom,
  40.         notRemovable,
  41.         dontForceRestart,
  42.         0,
  43.         0,
  44.         "Helvetica Font Decompression Example",
  45.         {
  46.             'inff', 1001
  47.         }
  48.     }
  49. };
  50.  
  51. /************************** Example File Atom **********************************/
  52. resource 'infa' (1001) {
  53.     format1 {
  54.         deleteWhenRemoving,
  55.         deleteWhenInstalling,
  56.         copy,
  57.         dontIgnoreLockedFile,
  58.         dontSetFileLocked,
  59.         useVersProcToCompare,
  60.         srcNeedExist,
  61.         rsrcForkInDataFork,
  62.         leaveAloneIfNewer,
  63.         updateExisting,
  64.         copyIfNewOrUpdate,
  65.         rsrcFork,
  66.         dataFork,
  67.         0,                    /* Total size will be filled in by ScriptCheck */
  68.         0,                    /* Finder attributes will be filled in by ScriptCheck */
  69.         10000,
  70.         {    20000, 0, 0 },    /* sizes will be filled in by ScriptCheck */
  71.         0x0,
  72.         0,
  73.         241,
  74.         ""
  75.     }
  76. };
  77.  
  78. /************************** Example Helvetica Font Atom **********************************/
  79. resource 'inff' (1001) {
  80.     format2 {
  81.         deleteWhenRemoving,
  82.         deleteWhenInstalling,
  83.         copy,
  84.         encodedFONDRsrc,
  85.         noTgtRequired,
  86.         updateExisting,
  87.         copyIfNewOrUpdate,
  88.         dontIgnoreProtection,
  89.         srcNeedExist,
  90.         byID,
  91.         nameNeedNotMatch,
  92.         10002,        /* Target */
  93.         20000,        /* Source */
  94.         32,            /* FOND Attributes */
  95.         0,            /* Total font size, filled in by ScriptCheck */
  96.         21,            /* FOND ID */
  97.         explicitFamilyMembers {{
  98.              0, noExtendedStyle, noCondensedStyle, noShadowStyle, noOutlineStyle, noUnderlineStyle, noItalicStyle, noBoldStyle, 'sfnt', 32, { 20000, 'part', 200, 0, "" },
  99.              0, noExtendedStyle, noCondensedStyle, noShadowStyle, noOutlineStyle, noUnderlineStyle, noItalicStyle, boldStyle,     'sfnt', 32, { 20000, 'part', 201, 0, "" },
  100.              9, noExtendedStyle, noCondensedStyle, noShadowStyle, noOutlineStyle, noUnderlineStyle, noItalicStyle, noBoldStyle, 'NFNT', 32,    { 20000, 'part', 202, 0, "" },
  101.             10, noExtendedStyle, noCondensedStyle, noShadowStyle, noOutlineStyle, noUnderlineStyle, noItalicStyle, noBoldStyle, 'NFNT', 32,    { 20000, 'part', 203, 0, "" },
  102.             12, noExtendedStyle, noCondensedStyle, noShadowStyle, noOutlineStyle, noUnderlineStyle, noItalicStyle, noBoldStyle, 'NFNT', 32,    { 20000, 'part', 204, 0, "" },
  103.             14, noExtendedStyle, noCondensedStyle, noShadowStyle, noOutlineStyle, noUnderlineStyle, noItalicStyle, noBoldStyle, 'NFNT', 32,    { 20000, 'part', 205, 0, "" },
  104.             18, noExtendedStyle, noCondensedStyle, noShadowStyle, noOutlineStyle, noUnderlineStyle, noItalicStyle, noBoldStyle, 'NFNT', 32,    { 20000, 'part', 206, 0, "" },
  105.             24, noExtendedStyle, noCondensedStyle, noShadowStyle, noOutlineStyle, noUnderlineStyle, noItalicStyle, noBoldStyle, 'NFNT', 32,    { 20000, 'part', 207, 0, "" }
  106.         }},
  107.         241,
  108.         "",
  109.         "Helvetica"
  110.     }
  111. };
  112.  
  113. /************************** Example File Target File Spec. **********************************/
  114. // target file spec for Example File
  115. resource 'intf' (10000) {
  116.     format1 {
  117.         noSearchForFile,                 // use default search path
  118.         
  119.         typeCrNeedNotMatch,             // If this is set to TypeCrMustMatch
  120.                                         // then a file with a different type
  121.                                         // and creator than those specified
  122.                                         // below will not be replaced.
  123.                                         // If this is set to TypeCrNeedNotMatch
  124.                                         // then type and creator of an existing
  125.                                         // target file are ignored.
  126.         
  127.         // The Type and Creator fields will be used to set the
  128.         // file's Type and Creator when a new file is created. 
  129.         'ttro',                         // TYPE for new file
  130.         'ttxt',                         // CREATOR for new file
  131.         
  132.         0,                                 // finder attribute flags
  133.                                         // filled by ScriptCheck is value is 0
  134.         
  135.         1,                                  // creation date for new file
  136.         1,                                  // modification date for new file
  137.                                         // NOTE: DATE values are filled
  138.                                         // by ScriptCheck if the value is 1
  139.                                             
  140.         0,                                 // search proc ID ( 'insp' ), none used
  141.         
  142.         "folder-user:Example File"        // target path to file
  143.         }
  144.     };
  145.  
  146. /*********************** Font Suitcase Target File Spec. *******************************/
  147.  
  148. resource 'intf' (10002) {
  149.     format1 {
  150.         noSearchForFile,                 // use default search path
  151.         
  152.         typeCrNeedNotMatch,             // If this is set to TypeCrMustMatch
  153.                                         // then a file with a different type
  154.                                         // and creator than those specified
  155.                                         // below will not be replaced.
  156.                                         // If this is set to TypeCrNeedNotMatch
  157.                                         // then type and creator of an existing
  158.                                         // target file are ignored.
  159.         
  160.         // The Type and Creator fields will be used to set the
  161.         // file's Type and Creator when a new file is created. 
  162.         'FFIL',                         // TYPE for new file
  163.         'DMOV',                         // CREATOR for new file
  164.         
  165.         0,                                 // finder attribute flags
  166.                                         // filled by ScriptCheck is value is 0
  167.         
  168.         1,                                  // creation date for new file
  169.         1,                                  // modification date for new file
  170.                                         // NOTE: DATE values are filled
  171.                                         // by ScriptCheck if the value is 1
  172.                                             
  173.         0,                                 // search proc ID ( 'insp' ), none used
  174.         
  175.         "folder-user:Example Fonts"        // path to target file
  176.         }
  177.     };
  178.  
  179. /************************** Archive Source File Spec. **********************************/
  180. resource 'infs' (20000) {
  181.     'ircp',
  182.     'kakc',
  183.     0x1,
  184.     noSearchForFile,
  185.     TypeCrMustMatch,
  186.     "Tidbits:Installation Data"
  187. };
  188.  
  189.  
  190. /************************** Preference Resource **********************************/
  191. resource 'inpr' (300) {
  192.     format0 {
  193.         useFolderTargetMode,
  194.         dontAllowUserToSetSystemDisk,
  195.         showSelectedSizeInCustom,
  196.         noSetupFunctionSupplied,
  197.         dontAllowCleanInstall,
  198.         dontAllowServerAsTarget,
  199.         0,
  200.         0,
  201.             {    
  202.             301, 311, 301, 311,
  203.             302, 312, 302, 312
  204.             },
  205.         "Example Folder"
  206.         }
  207.     };
  208.  
  209.  
  210.